
---@class CustomFollowAction:ActionBase
CustomFollowAction = class(ActionBase)

function CustomFollowAction:GetLabel()
    return ECustomActionLabel.Follow;
end

function CustomFollowAction:GetCost()
    return 3;
end

function CustomFollowAction:GetPriority()
    return 5;
end

function CustomFollowAction:GetCanInterruptiblePlan()
    return false;
end

function CustomFollowAction:InitPreconditions()
    local state = State.new()
    state:Set(ECustomStateKey.Can_move,true);
    state:Set(ECustomStateKey.Find_target,true);
    state:Set(ECustomStateKey.NearTarget,false);
    return state;
end

function CustomFollowAction:InitEffects()
    local state = State.new()
    state:Set(ECustomStateKey.NearTarget,true);
    state:Set(ECustomStateKey.CanAttackTarget,true);
    return state
end

